package com.ruoyi.system.service.impl;

import java.util.List;
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AH5vipTransSubMapper;
import com.ruoyi.system.domain.AH5vipTransSub;
import com.ruoyi.system.service.IAH5vipTransSubService;

/**
 * 转让vip 附加Service业务层处理
 *
 * @author gf
 * @date 2024-12-12
 */
@Service
public class AH5vipTransSubServiceImpl implements IAH5vipTransSubService {
    @Autowired
    private AH5vipTransSubMapper aH5vipTransSubMapper;

    /**
     * 查询转让vip 附加
     *
     * @param id 转让vip 附加主键
     * @return 转让vip 附加
     */
    @Override
    public AH5vipTransSub selectAH5vipTransSubById(Long id) {
        return aH5vipTransSubMapper.selectAH5vipTransSubById(id);
    }

    /**
     * 查询转让vip 附加列表
     *
     * @param aH5vipTransSub 转让vip 附加
     * @return 转让vip 附加
     */
    @Override
    public List<AH5vipTransSub> selectAH5vipTransSubList(AH5vipTransSub aH5vipTransSub) {
        return aH5vipTransSubMapper.selectAH5vipTransSubList(aH5vipTransSub);
    }

    /**
     * 新增转让vip 附加
     *
     * @param aH5vipTransSub 转让vip 附加
     * @return 结果
     */
    @Override
    public int insertAH5vipTransSub(AH5vipTransSub aH5vipTransSub) {
        aH5vipTransSub.setCreateTime(DateUtils.getNowDate());
        return aH5vipTransSubMapper.insertAH5vipTransSub(aH5vipTransSub);
    }

    /**
     * 修改转让vip 附加
     *
     * @param aH5vipTransSub 转让vip 附加
     * @return 结果
     */
    @Override
    public int updateAH5vipTransSub(AH5vipTransSub aH5vipTransSub) {
        aH5vipTransSub.setUpdateTime(DateUtils.getNowDate());
    return aH5vipTransSubMapper.updateAH5vipTransSub(aH5vipTransSub);
    }

    /**
     * 批量删除转让vip 附加
     *
     * @param ids 需要删除的转让vip 附加主键
     * @return 结果
     */
    @Override
    public int deleteAH5vipTransSubByIds(Long[] ids) {
        return aH5vipTransSubMapper.deleteAH5vipTransSubByIds(ids);
    }

    /**
     * 删除转让vip 附加信息
     *
     * @param id 转让vip 附加主键
     * @return 结果
     */
    @Override
    public int deleteAH5vipTransSubById(Long id) {
        return aH5vipTransSubMapper.deleteAH5vipTransSubById(id);
    }

    /**
     * 批量逻辑删除转让vip 附加
     *
     * @param ids 需要删除的转让vip 附加主键
     * @return 结果
     */
    @Override
    public int logicDeleteAH5vipTransSubByIds(Long[] ids) {
        return aH5vipTransSubMapper.logicDeleteAH5vipTransSubByIds(ids);
    }
    /**
     * 逻辑删除转让vip 附加信息
     *
     * @param id 转让vip 附加主键
     * @return 结果
     */
    @Override
    public int logicDeleteAH5vipTransSubById(Long id) {
        return aH5vipTransSubMapper.logicDeleteAH5vipTransSubById(id);
    }

}
